package router

import (
	"ginorm/service"

	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.GET("/index", service.Index)

	account := r.Group("/api/v1/user")
	{
		account.POST("/create", service.CreateUser)
		account.DELETE("/delete", service.DeleteUser)
		account.PUT("/update", service.UpdatePassword)
		account.GET("/list", service.SelectUser)
	}

	return r
}
